﻿
using System.Collections.Generic;

namespace Neo4jRestSharp.Neo4jObjectServices
{
	public interface IRelationshipObjectServices
	{
		/// <summary>
		/// Create node relationship
		/// </summary>
		/// <remarks>
		/// Http Success Response: 201 (ok, relationship was created)        
		/// Http Error Response: 400 (invalid data sent)
		/// Http Error Response: 405 ("to" node, or the node specified by the URI not found)
		/// Http Content:
		/// {
		/// }
		/// </remarks>
		Relationship CreateRelationship<T>(T fromNode, string relationshipType, T toNode)
			where T : Node;

		/// <summary>
		/// Set properties on relationship
		/// Replaces all properties on a relationship with the supplied set of properties.
		/// </summary>
		/// <remarks>
		/// Http Success Response: 204 (a-ok, no content returned)        
		/// Http Error Response: 400 (invalid data sent)
		/// Http Error Response: 404 (relationship not found)
		/// Http Content:
		/// {
		/// }
		/// </remarks>
		void SetRelationshipProperties(Relationship relationship);

		/// <summary>
		/// Get properties on relationship
		/// </summary>
		/// <remarks>
		/// Http Success Response: 200 (a-ok)
		/// Http Success Response: 204 (a-ok, no relationships found)
		/// Http Error Response: 404 (relationship not found)
		/// Http Content:
		/// {
		/// }
		/// </remarks>
		void GetRelationshipProperties(Relationship relationship);

	    /// <summary>
	    /// Remove all properties on relationship
	    /// </summary>
	    /// <remarks>
	    /// Http Success Response: 204 (a-ok, no content returned)        
	    /// Http Error Response: 404 (relationship not found)
	    /// Http Content:
	    /// {
	    /// }
	    /// </remarks>
		void RemoveRelationshipProperties(Relationship relationship);

	    /// <summary>
	    /// Set a single property on relationship        
	    /// </summary>
	    /// <remarks>
	    /// Http Success Response: 204 (a-ok, no content returned)        
	    /// Http Error Response: 400 (invalid data sent)
	    /// Http Error Response: 404 (relationship not found)
	    /// Http Content:
	    /// {
	    /// }
	    /// </remarks>
	    void SetRelationshipProperty();

	    /// <summary>
	    /// Get a single property relationship
	    /// </summary>
	    /// <remarks>
	    /// Http Success Response: 200 (a-ok)
	    /// Http Error Response: 404 (relationship not found)
	    /// Http Content:
	    /// {
	    /// }
	    /// </remarks>
	    void GetRelationshipProperty();

	    /// <summary>
	    /// Remove a single property on relationship        
	    /// </summary>
	    /// <remarks>
	    /// Http Success Response: 204 (a-ok, no content returned)        
	    /// Http Error Response: 404 (relationship or property not found)
	    /// Http Content:
	    /// {
	    /// }
	    /// </remarks>
	    void RemoveRelationshipProperty();

		/// <summary>
		/// Delete relationship        
		/// </summary>
		/// <remarks>
		/// Http Success Response: 204 (a-ok, no content returned)        
		/// Http Error Response: 404 (relationship not found)
		/// Http Content:
		/// {
		/// }
		/// </remarks>
		void RemoveRelationship(Relationship relationship);

	    /// <summary>
	    /// Get relationships on node
	    /// </summary>
	    /// <remarks>
	    /// Http Success Response: 200 (a-ok, no content returned)        
	    /// Http Error Response: 404 (node not found)
	    /// Http Content:
	    /// {
	    /// }
	    /// </remarks>
		IEnumerable<Relationship> GetRelationshipsOnNode(int nodeId, RelationshipDirection relationshipDirection, IEnumerable<string> relationshipTypes);
	}
}